<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>线性渐变</title>
		<style type="text/css">
			div{
				width: 400px;
				height: 400px;
				border: 1px solid #f00;
				background-image: linear-gradient(45deg,yellow 20%,white 60%,green 80%);
			}
		</style>
	</head>
	<body>
		<div></div>
	</body>
</html>